package com.atguigu.spzx.manager.mapper;

import com.atguigu.spzx.model.entity.product.Brand;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassName: BrandMapper
 * Package: com.atguigu.spzx.manager.mapper
 * Description:
 *
 * @Author 刘强
 * @Create 2024/7/5 14:41
 * @Version 1.0
 */
@Mapper
public interface BrandMapper {
    /**
     * 分页查询
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<Brand> page(Integer pageNum, Integer pageSize);

    /**
     * 新增品牌
     * @param brand
     */
    void save(@Param("brand") Brand brand);

    /**
     * 根据id修改
     * @param brand
     */
    void updateById(@Param("brand") Brand brand);

    /**
     * 根据id删除
     * @param id
     */
    void deleteById(@Param("id") Long id);

    /**
     * 查询所有品牌
     * @return
     */
    List<Brand> findAll();
}
